package javabean;

import com.fasterxml.jackson.annotation.JsonInclude;

import java.util.Objects;

/**
 * packageName com.mt.bms.dao
 *
 * @author Administrator
 * @version 1.0
 * @className User (此处以class为例)
 * @date 2024/8/2
 * @description
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
public class User {
    private Integer id;
    private String userName;
    private String passWord;
    private String name;
    private String email;
    private Double balance;

    public User() {
    }

    public User(String userName, String passWord, String name, String email, Double balance) {
        this.userName = userName;
        this.passWord = passWord;
        this.name = name;
        this.email = email;
        this.balance = balance;
    }

    public User(Integer id, String userName, String passWord, String name, String email, Double balance) {
        this.id = id;
        this.userName = userName;
        this.passWord = passWord;
        this.name = name;
        this.email = email;
        this.balance = balance;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        User user = (User) o;
        return Objects.equals(id, user.id) && Objects.equals(userName, user.userName) && Objects.equals(passWord, user.passWord) && Objects.equals(name, user.name) && Objects.equals(email, user.email) && Objects.equals(balance, user.balance);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, userName, passWord, name, email, balance);
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", userName='" + userName + '\'' +
                ", passWord='" + passWord + '\'' +
                ", name='" + name + '\'' +
                ", email='" + email + '\'' +
                ", blance=" + balance +
                '}';
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassWord() {
        return passWord;
    }

    public void setPassWord(String passWord) {
        this.passWord = passWord;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public Double getBalance() {
        return balance;
    }

    public void setBalance(Double balance) {
        this.balance = balance;
    }
}